// 获取菜单
export const fetchMenu = (params, config = {}) => uni.$u.http.post('/ebapi/public_api/index', params, config)

//企业介绍tab数据
export const businessCondition = (data) => uni.$u.http.get('/app/business/condition', data)

//企业介绍
export const enterpriseintroduction = (data) => uni.$u.http.get('/app/business/enterpriseintroduction', data)

//核心业务
export const corebusiness = (data) => uni.$u.http.get('/app/business/corebusiness', data)

//车型介绍
export const modelintroduction = (data) => uni.$u.http.get('/app/business/modelintroduction', data)

//违章提醒
export const getIllegalInfor = (params, config = {
	header: {
		'content-type': 'application/x-www-form-urlencoded;charset=UTF-8',
	}
}) => uni.$u.http.post('/app/getIllegalInfor', params, config)

//获取维保个数
export const maintenanceremindcount = (data) => uni.$u.http.get('/app/car/maintenanceremindcount', data)

//保险列表
export const insurancelist = (data) => uni.$u.http.get('/app/insurance/remind/list', data)
// export const insurancelist = (params, config = {}) =>uni.$u.http.post('/app/illegal/list', params, config)//测试假数据

//年检列表
export const inspectionlist = (data) => uni.$u.http.get('/app/inspection/remind/list', data)

//保养列表
export const maintenancelist = (data) => uni.$u.http.get('/app/maintenance/remind/list', data)

//保险详情
export const insuranceinfo = (data) => uni.$u.http.get('/app/insurance/remind/info', data)

//年检详情
export const inspectioninfo = (data) => uni.$u.http.get('/app/inspection/remind/info', data)

//保养详情
export const maintenanceinfo = (data) => uni.$u.http.get('/app/maintenance/remind/info', data)

//缴费账单
export const receivablelist = (data) => uni.$u.http.get('/app/receivable/list', data)

//缴费账单详情
export const receivableinfo = (id) => uni.$u.http.get(`/app/receivable/info/${id}`)

//我的车辆
export const carlist = (data) => uni.$u.http.get('/app/car/list', data)

//我的车辆详情
export const mycarinfo = (data) => uni.$u.http.get('/app/car/info', data)

// //我的车辆-保险详情(貌似废弃)
// export const getInsuranceDetails = (params, config = {}) =>uni.$u.http.post('/app/getInsuranceDetails', params, config)

// //我的车辆-年检详情(貌似废弃)
// export const getInspectionDetails = (params, config = {}) =>uni.$u.http.post('/app/getInspectionDetails', params, config)

// //我的车辆-保养详情(貌似废弃)
// export const getMaintenanceDetails = (params, config = {}) =>uni.$u.http.post('/app/getMaintenanceDetails', params, config)

//运力合作列表
export const supplymanagement = (data) => uni.$u.http.get('/app/supplymanagement/list', data)

//运力合作报名
export const cluessourcesignsubmit = (params, config = {
	header: {
		'content-type': 'application/x-www-form-urlencoded;charset=UTF-8',
	}
}) => uni.$u.http.post('/app/cluessourcesign/submit', params, config)

//售后服务
export const afterservice = () => uni.$u.http.get('/app/activity/afterservice')

//客服电话
export const hotline = () => uni.$u.http.get('/app/common/hotline')

//客服中心信息
export const customerservice = () => uni.$u.http.get('/app/common/customerservice')

//意见反馈
export const sysfeedbacksubmit = (params, config = {
	header: {
		'content-type': 'application/x-www-form-urlencoded;charset=UTF-8',
	}
}) => uni.$u.http.post('/app/sysfeedback/submit', params, config)

//上传图片
export const uploadfiles = (data = {}) => {
	return uni.$u.http.upload('/upload/files', {
		name: 'files',
		filePath: data.filePath,
	}).then(res => {
		console.log(res);
		return res;
	}).catch(err => {
		console.log(err);
	})
}

//合作加盟
export const cooperationandalliance = () => uni.$u.http.get('/app/activity/cooperationandalliance')

//合作加盟提交
export const cluescontractjoinsubmit = (params, config = {
	header: {
		'content-type': 'application/x-www-form-urlencoded;charset=UTF-8',
	}
}) => uni.$u.http.post('/app/cluescontractjoin/submit', params, config)

//消息通知列表
export const messageNoticelist = (data) => uni.$u.http.get('/app/messageNotice/list', data)

//删除消息
export const messageNoticedelete = (params, config = {
	header: {
		'content-type': 'application/x-www-form-urlencoded;charset=UTF-8',
	}
}) => uni.$u.http.post('/app/messageNotice/delete', params, config)


//消息通知详情
export const messageNoticedetail = (data) => uni.$u.http.get('/app/messageNotice/detail', data)

//提现记录
export const apiGetWithdrawalRecordList = (params, config = {
	header: {
		'content-type': 'application/x-www-form-urlencoded;charset=UTF-8',
	}
}) => uni.$u.http.post('/app/withdrawalApply/apiGetWithdrawalRecordList', params, config)

//获取当前开发环境
export const commonenv = () => uni.$u.http.get('/app/common/env')

//车辆订单列表
export const ordercarlist = (data) => uni.$u.http.get('/app/ordercar/list', data)

//车辆订单详情
export const ordercarinfo = (id) => uni.$u.http.get(`/app/ordercar/info/${id}`)

//车辆详情
export const schemeinfo = (data) => uni.$u.http.get('/app/scheme/info', data)

//选车列表
export const schemelist = (data) => uni.$u.http.get('/app/scheme/list', data)

//子方案列表
export const schemesublist = (data) => uni.$u.http.get('/app/scheme/sublist', data)

//方案参数列表
export const schemeparamlist = (data) => uni.$u.http.get('/app/scheme/paramlist', data)

//试驾列表
export const cluessourcedriverlist = (data) => uni.$u.http.get('/app/cluessourcedriver/list', data)

//试驾列表个数
export const cluessourcedrivercount = () => uni.$u.http.get('/app/cluessourcedriver/count')

//试驾订单详情
export const cluessourcedriverinfo = (data) => uni.$u.http.get('/app/cluessourcedriver/info', data)

//银行卡列表
export const bankCarList = () => uni.$u.http.get('/app/customer/bankCarList')

//解绑银行卡
export const customerunsign = (data) => uni.$u.http.get('/app/customer/unsign', data)

//添加银行卡-发送验证码
export const customersginSendMsg = (params, config = {
}) => uni.$u.http.post('/app/customer/sginSendMsg', params, config)

//添加银行卡-绑定银行卡
export const customersgin = (params, config = {
}) => uni.$u.http.post('/app/customer/sgin', params, config)


//根据账单获取可用优惠券
export const payOrderCoupon = (params, config = {
	// header: {
	// 	'content-type': 'application/x-www-form-urlencoded;charset=UTF-8',
	// }
}) => uni.$u.http.post('/app/customer/payOrderCoupon', params, config)

//付款详情
export const infocollection = (id) => uni.$u.http.get(`/app/ordercar/info/collection/${id}`)


//小程序支付/app/pay  行知支付/app/juhe/pay
export const apppay = (params, url='/app/pay', config = {
	header: {
		'content-type': 'application/x-www-form-urlencoded;charset=UTF-8',
	}
}) => uni.$u.http.post(url, params, config)

//订阅消息通用
export const subscribeList = (data) => uni.$u.http.get('/app/common/subscribeList', data)


//小程序取消支付
export const paycancel = (params, config = {
	header: {
		'content-type': 'application/x-www-form-urlencoded;charset=UTF-8',
	}
}) => uni.$u.http.post('/app/pay/cancel', params, config)


//是否开通代扣1.开通 2.未开通 (是否展示银行卡、支付方式)
export const getDaiKouFlag = () => uni.$u.http.get('/app/common/getDaiKouFlag')


//登录学习测验模块
export const doMemberLogin = (params, config = {
}) => uni.$u.http.post('/member/doMemberLogin', params, config)


//银行卡识别
export const getBankCardInfo = (data) => uni.$u.http.get('/app/ocr/getBankCardInfo', data)

/************************************************活动及优惠券相关接口***************************************************/

/******优惠券*****/
//登录推荐优惠券
export const recommendCoupon = (params, config = {}) => uni.$u.http.post('/server_2/api/home/recommendCoupon', params, config)

//首页优惠券
export const apiHomeCoupon = (params, config = {}) => uni.$u.http.post('/server_2/api/home/homeCoupon', params, config)

//首页《更多》优惠券列表
export const apiCouponList = (params, config = {}) => uni.$u.http.post('/server_2/api/home/apiCouponList', params, config)

//优惠券适用项目
export const serviceItemsList = (params) => uni.$u.http.get('/server_2/api/home/serviceItemsList/' + params)

//优惠券业务适用部门
export const unitList = (params, config = {}) => uni.$u.http.post('/server_2/api/home/unitList', params, config)

//客户领取优惠券
export const receiveCoupons = (params, config = {}) => uni.$u.http.post('/server_2/api/coupon/receiveCoupons', params, config)

//我的优惠券
export const apiMyCouponList = (params) => uni.$u.http.get('/app/coupon/apiMyCouponList/', {params})
//老接口废弃
// export const apiMyCouponList = (params, config = {}) => uni.$u.http.post('/server_2/api/coupon/apiMyCouponList', params, config)


//客户领取优惠券
export const coupongenerate = (params, config = {}) => uni.$u.http.post('/app/coupon/generate', params, config)

//首页是否展示优惠券浮窗
export const getIfHaveCoupon = (params) => uni.$u.http.get('/app/home/getIfHaveCoupon', {params})

//客户优惠券明细
export const apiMyCouponInfo = (params, config = {}) => uni.$u.http.get('/server_2/api/coupon/apiMyCouponInfo/'+params)

//转增优惠券
export const turnCoupon = (params, config = {}) => uni.$u.http.post('/server_2/api/coupon/turnCoupon', params, config)


/******活动*****/
//首页活动
export const apiActivityList = (params, config = {}) => uni.$u.http.post('/server_2/api/home/apiActivityList', params, config)

//秒杀活动详情
export const apiActivityInfo = (params, config = {}) => uni.$u.http.post('/api/home/apiActivityInfo', params, config)

//集客活动详情
export const apiCollectInfo = (params, config = {}) => uni.$u.http.post('/server_2/api/home/apiCollectInfo', params, config)

//同行活动详情
export const clientPeerInfo = (params, config = {
	// header: {
	// 	'content-type': 'application/x-www-form-urlencoded;charset=UTF-8',
	// }
}) => uni.$u.http.post('/api/home/clientPeerInfo', params, config)

//抽奖页面
export const luckdrawPage = (params, config = {
	header: {
		'content-type': 'application/x-www-form-urlencoded;charset=UTF-8',
	}
}) => uni.$u.http.post('/server_2/api/home/luckdrawPage', params, config)

//同行邀请组队
export const invitedUsers = (params, config = {}) => uni.$u.http.post('/api/home/invitedUsers', params, config)

//秒杀活动已购买客户
export const seckillHaveBoughtCustomer = (params, config = {}) => uni.$u.http.post('/api/home/seckillHaveBoughtCustomer', params, config)

//抽奖记录
export const winningRecordAll = (params, config = {
	// header: {
	// 	'content-type': 'application/x-www-form-urlencoded;charset=UTF-8',
	// }
}) => uni.$u.http.post('/server_2/api/home/winningRecord', params, config)

//我的抽奖记录
export const mineWinningRecordAll = (params, config = {}) => uni.$u.http.post('/server_2/api/home/winningRecordAll', params, config)

//抽奖
export const luckyDraw = (params, config = {}) => uni.$u.http.post('/server_2/api/home/luckyDraw', params, config)

//兑换积分抽奖次数
export const pointsFor = (params, config = {}) => uni.$u.http.post('/server_2/api/home/pointsFor', params, config)

//集客报名
export const collectOrder = (params, config = {}) => uni.$u.http.post('/server_2/api/home/collectOrder', params, config)

//秒杀下单未支付取消订单
export const cancelActivityOrder = (params, config = {}) => uni.$u.http.post('/api/home/cancelActivityOrder', params, config)

//秒杀下单
export const seckillOrder = (params, config = {}) => uni.$u.http.post('/api/home/seckillOrder', params, config)

//活动浏览记录
export const insertActivityBrowseRecords = (params, config = {}) => uni.$u.http.post('/api/activity/insertActivityBrowseRecords', params, config)

//新增业务客户
export const insertMember = (params, config = {}) => uni.$u.http.post('/api/home/insertMember', params, config)

//订单列表
export const myOrderList = (params, config = {}) => uni.$u.http.post('/api/activity/myOrderList', params, config)

// 订单统计
export const myOrderCount = (params, config = {}) => uni.$u.http.get('/api/activity/myOrderCount/'+params)


//秒杀活动详情
export const seckillOrderInfo = (params, config = {}) => uni.$u.http.post('/api/activity/seckillOrderInfo', params, config)

//同行活动详情
export const peerOrderInfo = (params, config = {}) => uni.$u.http.post('/api/activity/peerOrderInfo', params, config)

//抽奖活动详情
export const luckdrawOrderInfo = (params, config = {}) => uni.$u.http.post('/server_2/api/activity/luckdrawOrderInfo', params, config)

/************************************************全名营销相关接口***************************************************/
// 客户累计收益和可提现金额
export const memberAccount = (params, config = {}) => uni.$u.http.get('/api/member/memberAccount/'+params)

//客户收益明细
export const apiReturnsDetailedList = (params, config = {}) => uni.$u.http.post('/api/member/apiReturnsDetailedList', params, config)

//客户提现界面
export const memberWithdrawal = (params, config = {}) => uni.$u.http.post('/api/member/memberWithdrawal', params, config)

//客户支付宝账号
export const selectAlipay = (params, config = {}) => uni.$u.http.get('/api/member/selectAlipay/'+params)

//绑定客户支付宝账号
export const bindingAlipay = (params, config = {}) => uni.$u.http.post('/api/member/bindingAlipay', params, config)

//发送验证码
export const verifyPhone = (params, config = {}) => uni.$u.http.get('/api/member/verifyPhone/'+params)

//客户提现明细
export const withdrawalRecord = (params, config = {}) => uni.$u.http.post('/api/member/withdrawalRecord', params, config)

//客户提现
export const customerWithdrawal = (params, config = {}) => uni.$u.http.post('/api/member/customerWithdrawal', params, config)

//提现接口
export const doWithDraw = (params, config = {}) => uni.$u.http.post('/app/withdraw/doWithDraw', params, config)

//提现明细
export const getWithDrawInfo = (params) => uni.$u.http.get('/app/withdraw/getWithDrawInfo', {params})

//维修保养地点接口
export const getMainPlace = (params) => uni.$u.http.get('/app/mainPlace/getMainPlace', {params})